package api

import (
	"github.com/gin-gonic/gin"
	"zy12/api/handler"
	"zy12/api/moddleware"
)

func Router(r *gin.Engine) {
	r.Use(moddleware.Url())
	api := r.Group("api")
	{
		user := api.Group("/user")
		{
			user.POST("/send", handler.Send)
			user.POST("/login", handler.Login)
		}
		comment := api.Group("/comment")
		{
			comment.POST("addComment", handler.Comment)
		}
	}
}
